<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String channel = "luntan";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="shortcut icon" href="<%=path %>/resources/images/favicon.ico" type="image/x-icon" />
	<title>Smooth Admin</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<%@ include file="/WEB-INF/view/include/_js.jspf"%>
	<script type="text/javascript">
		
		function topage(page){
			var baseUrl = document.location.href;
			if(document.location.href.indexOf("&currentPage") > 0)
				baseUrl = baseUrl.substring(0,document.location.href.indexOf("&currentPage"));
				
			window.location.href = baseUrl + "&currentPage=" + page; 
		}
	</script>
</head>
<body>
<div id="colors-switcher" class="color">
	<a href="" class="blue" title="Blue"></a>
	<a href="" class="green" title="Green"></a>
	<a href="" class="brown" title="Brown"></a>
	<a href="" class="purple" title="Purple"></a>
	<a href="" class="red" title="Red"></a>
	<a href="" class="greyblue" title="GreyBlue"></a>
</div>
<!-- end dialogs -->
<%@ include file="/WEB-INF/view/include/header.jspf"%>
<!-- content -->
<div id="content">
	<!-- end content / left -->
	<%@ include file="/WEB-INF/view/include/left.jspf"%>
	<!-- end content / left -->
	<!-- content / right -->
	<div id="right">
		<div id="box-tabs" class="box">
			<!-- box / title -->
			<div id="box-other">
				<!-- headings -->
				<h5>${forum.title }</h5>
				<blockquote><p>发表时间：${forum.sendTime } 作者：${forum.author }</p></blockquote>
				${forum.content }
				<!-- end headings -->
				<h5></h5>
				<c:forEach items="${pageView.records}" var="c">
					<blockquote><p>发表时间：${c.sendTime } 作者：${c.author }</p></blockquote>
					${c.content }
				</c:forEach>
				<!-- pagination -->
				<div class="pagination pagination-left" style=" float:left; ">
					<ul class="pager">
						<li><a href="javascript:topage('1')">&laquo; first</a></li>
						<c:forEach begin="${pageView.pageindex.startindex}"
							end="${pageView.pageindex.endindex}" var="wp">
							<c:if test="${pageView.currentpage==wp}">
								<li class="current">${wp}</li>
							</c:if>
							<c:if test="${pageView.currentpage!=wp}">
								<li><a href="javascript:topage('${wp}')">${wp}</a></li>
							</c:if>
						</c:forEach>
						<li><a href="javascript:topage('${pageView.totalpage}')">end &raquo;</a></li>
					</ul>
				</div>
				<!-- pagination -->
			</div>
		</div>
		<!-- forms -->
		<div class="box">
			<form id="form" action="<%=path%>/forum/addreply.html" method="post">
			<input type="hidden" name="pid" value="${forum.id }"/>
				<div class="form">
					<div class="fields">
						<div class="field">
							<div class="label label-textarea">
								<label for="textarea">
									回复:
								</label>
							</div>
							<div class="textarea textarea-editor">
								<textarea id="textarea" name="content" cols="50" rows="12"
									class="editor"></textarea>
							</div>
						</div>
						<div class="buttons">
							<input type="submit" name="submit" value="提交" />
						</div>
					</div>
				</div>
			</form>
		</div>
		<!-- end forms -->
		
	</div>
	<!-- end content / right -->
</div>
<!-- end content -->
<!-- footer -->
<%@ include file="/WEB-INF/view/include/footer.jspf"%>
<!-- end footert -->
</body>
</html>